<layout name="layout" />
<!-- 搜索 -->
<section class="larry-wrapper"  >
<div class="form-div search_form_div">
    <form action="__ACTION__" method="GET" name="search_form" class="layui-form layui-form-pane">
    <div class="layui-form-item">
       <label class="layui-form-label">序列号</label>
       <div class="layui-input-inline">
         <input type="text" name="sernumber"  value="<?php echo I('get.sernumber'); ?>" class="layui-input"/>
       </div>
       <input type="submit" class="layui-btn" value="搜索"/>
     </div>
    </form>
</div>
<!-- 列表 -->
<div class="list-div" id="listDiv">
  <table class="layui-table" lay-skin="line">
    	<tr>
            <th >网关名称</th>
            <th >序列号</th>
            <th >型号</th>
            <th >状态</th>
            <th >上次联系时间</th>
            <th >注册时间</th>
			      <th >操作</th>
        </tr>
		<?php foreach ($data as $k => $v): ?>
			<tr class="tron">
				<td><?php echo $v['name']; ?></td>
				<td><?php echo $v['sernumber']; ?></td>
				<td><?php echo $v['project_name']; ?></td>
				<td>
				<?php
				if($v['status']==0) echo '离线';
				if($v['status']==1) echo '在线';
				?>
			    </td>
				<td><?php echo $v['con_time']; ?></td>
				<td><?php echo $v['reg_time']; ?></td>
		        <td align="center">
		        	<a href="<?php echo U('datatable/lst?id='.$v['id']); ?>" class="layui-btn layui-btn-small">实时数据</a>
		        </td>
	        </tr>
        <?php endforeach; ?>
		<?php if(preg_match('/\d/', $page)): ?>
        <tr><td align="right" nowrap="true" colspan="99" height="30"><?php echo $page; ?></td></tr>
        <?php endif; ?>
	</table>
</div>
</section>
